package com.easy.config;

import com.easy.common.config.BaseSwaggerConfig;
import com.easy.common.domain.SwaggerProperties;
import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebFlux;
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;


/**
 * @author 风亦未止
 * @date 2021/9/20 13:55
 */
@Configuration
@EnableSwagger2WebMvc
@EnableKnife4j
public class SwaggerConfig extends BaseSwaggerConfig {
    @Override
    public SwaggerProperties swaggerProperties() {
        return SwaggerProperties.builder()
                .groupName("1.0版本")
                .contactUrl("https://www.52zzk.cn")
                .apiBasePackage("com.easy.controller")
                .title("小纸条easy微信小程序前台系统")
                .description("小纸条easy微信小程序前台相关接口文档")
                .contactName("风亦未止")
                .version("1.0")
                .enableSecurity(false)
                .build();
    }
//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//        registry.addResourceHandler("/doc.html")
//                .addResourceLocations("classpath:/META-INF/resources/");
//    }


}
